<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/10/30
 * Time: 17:08
 */

namespace app\adminapiv3\service;


use app\common\service\ServerAuth;

class ServerOptionHistory extends Base
{
    function list($params, $limit = 10)
    {
        $server = new \app\common\service\ServerOptionHistory();
        $list = $server->list($params, $limit);

        foreach($list['data'] as $k => $v){
            $v['ctime'] = date('Y-m-d H:i:s', $v['ctime']);
            $list['data'][$k] = $v;
        }

        return $list;
    }


    function indexData()
    {
        //1. 查询模块
        $moduleServer = new ServerAuth();
        $module = $moduleServer->findAll('id, product_name as name');

        $data['module_name'] = $module;

        return $data;
    }
}